/* 页面头部样式 - 移动端优化 */
.page-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: var(--card-background);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    z-index: 1;
}

.header-content {
    flex: 1;
    z-index: 2;
}

.page-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-xs) 0;
    letter-spacing: -0.5px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

/* 植物档案页搜索框样式 - 移动端优化 */
.search-box {
    background: var(--card-background);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    margin-top: var(--spacing-lg);
}

.search-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-box:focus-within::before {
    opacity: 1;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    color: var(--text-primary);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(248, 249, 250, 0.8);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.search-input:focus {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.2);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-icon {
    font-size: 20px;
    color: var(--text-muted);
    margin-left: var(--spacing-md);
    transition: color 0.3s ease;
}

.search-box:focus-within .search-icon {
    color: var(--primary-color);
}

/* 分类列表样式 - 移动端优化 */
.category-list {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    overflow-x: auto;
    padding: var(--spacing-sm) var(--spacing-md) var(--spacing-sm) 0;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-list::-webkit-scrollbar {
    display: none;
}

/* 添加渐变遮罩效果 */
.category-list::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(to right, transparent, var(--background-color));
    pointer-events: none;
}

.category-tag {
    background: var(--card-background);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    min-width: fit-content;
}

.category-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-tag:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    background: var(--card-background-hover);
}

.category-tag:hover::before {
    opacity: 1;
}

.category-tag.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-medium);
}

.category-tag.active::before {
    opacity: 1;
    background: rgba(255, 255, 255, 0.3);
}

/* 植物卡片列表样式 - 移动端优化 */
.plant-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
    margin-bottom: 80px; /* 为底部导航留出空间 */
}

/* 植物卡片组件样式 */
.plant-card {
    background: var(--card-background);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-md);
    min-height: 120px;
    text-align: center;
}

.plant-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.plant-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    background: var(--card-background-hover);
}

.plant-card:hover::before {
    opacity: 1;
}

.plant-img {
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    transition: all 0.3s ease;
    margin-bottom: var(--spacing-sm);
    flex-shrink: 0;
    box-shadow: var(--shadow-light);
}

.plant-card:hover .plant-img {
    transform: scale(1.1);
    box-shadow: var(--shadow-medium);
}

.plant-card-info {
    flex: 1;
    min-width: 0;
    width: 100%;
}

/* 植物卡片标题样式 - 移动端优化 */
.plant-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    letter-spacing: -0.3px;
    line-height: 1.2;
}

/* 植物卡片描述样式 */
.plant-card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
}

/* 植物卡片状态样式 */
.plant-card-status {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: var(--primary-color);
}

/* 植物卡片响应式调整 */
@media (max-width: 480px) {
    .plant-list {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-xs);
    }
    
    .plant-card {
        padding: var(--spacing-sm);
        min-height: 100px;
    }
    
    .plant-img {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .plant-name {
        font-size: 12px;
    }
}

@media (max-width: 375px) {
    .plant-list {
        grid-template-columns: 1fr;
    }
    
    .plant-card {
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: var(--spacing-md);
        min-height: 80px;
    }
    
    .plant-img {
        margin-right: var(--spacing-sm);
        margin-bottom: 0;
    }
}

/* 底部模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background-color: var(--card-background);
    border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
    width: 100%;
    max-height: 80vh;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.modal-container.active {
    transform: translateY(0);
}

.modal-content {
    padding: var(--spacing-md);
}

.modal-header {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.modal-plant-icon {
    font-size: 60px;
    margin-right: var(--spacing-md);
}

.modal-plant-info {
    flex: 1;
}

.modal-plant-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.modal-growth-period {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.modal-category {
    font-size: 13px;
    color: var(--text-muted);
    padding: var(--spacing-xs) var(--spacing-sm);
    background-color: rgba(46, 125, 50, 0.1);
    border-radius: var(--border-radius-sm);
    display: inline-block;
}

.modal-details {
    margin-bottom: var(--spacing-lg);
}

.modal-description {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.modal-care {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.modal-footer {
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: var(--spacing-md);
}

.modal-footer button {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary {
    background-color: var(--card-background);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

/* 响应式调整 */
@media (max-width: 375px) {
    .modal-plant-icon {
        font-size: 50px;
    }
    
    .modal-plant-name {
        font-size: 18px;
    }
}